package com.zjitc.P3;

import org.aspectj.lang.annotation.After;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut;

/**
 * Create by IntelliJ IDEA
 *
 * @author: jsonor
 * @date-Time: 2018/3/13 16:49
 * @description:
 */
@Aspect //切面类
public class AspectDemo {

  @Pointcut("execution(* com.zjitc.P3.A.a())")
  private void pointcutA(){}


  @After("pointcutA()")
  public void afterA(){
    System.out.println("after A");
  }

  @Before("pointcutA()")
  public void beforeA(){
    System.out.println("before A");
  }
}
